<?php 
require_once("../inc/conn.php");
require_once("../inc/session.php");
?>
<!doctype html>
<html>
<meta charset="utf-8" />
<title>写入信息</title>
</head>

<body>
<form action="saveinfo.php" method="post" name="form1">
  <table width="98%" border="1" align="center" cellpadding="5">
    <tbody>
      <tr>
        <td width="35%" align="center">&nbsp;</td>
        <td width="65%" align="left">写入信息</td>
      </tr>
      <tr>
        <td align="right">用户名：</td>
        <td align="left"><input name="name" type="text" id="name">
          *&nbsp;
          <input type="submit" name="submit2" id="submit2" value="唯一性验证" onclick="javascript:form1.action='checkuser.php'">
          &nbsp; 用户名必须是6-16位的字符。</td>
      </tr>
      <tr>
        <td align="right">选择所属部门：</td>
        <td align="left"><select name="depart" id="depart">
            <option selected="selected">--请选择--</option>
            <?php
            $sql = "select * from department order by id desc";
            $rs = $conn->query($sql);
            while ( $row = $rs->fetch_assoc() ) {
              ?>
            <option value="<?php echo $row[ "id" ];?>"><?php echo $row[ "name" ];?></option>
            <?php
            }
            ?>
        </select></td>
      </tr>
      <tr>
        <td align="right">密码：</td>
        <td align="left"><input type="password" name="pass" id="pass">
          *</td>
      </tr>
      <tr>
        <td align="right">确认密码:</td>
        <td align="left"><input type="password" name="pass1" id="pass1"></td>
      </tr>
      <tr>
        <td align="right">性别：</td>
        <td align="left"><label>
            <input name="sex" type="radio" id="sex_0" value="女" checked="checked">
            女</label>
          <label>
            <input type="radio" name="sex" value="男" id="sex_1">
            男</label></td>
      </tr>
      <tr>
        <td align="right">微信：</td>
        <td align="left"><input name="weixin" type="text"  id="weixin"></td>
      </tr>
      <tr>
        <td align="right">地址：</td>
        <td align="left"><input name="address" type="text"  id="address" size="50"></td>
      </tr>
      <tr>
        <td align="right">兴趣爱好：</td>
        <td align="left"><input name="ck[]" type="checkbox" id="ck[]" value="踢足球">
          <label for="">踢足球
            <input name="ck[]" type="checkbox" id="ck[]" value="打篮球">
            打篮球 </label>
          <input name="ck[]" type="checkbox" id="ck[]" value="听音乐">
          <label for="label">听音乐</label>
          <input name="ck[]" type="checkbox" id="ck[]" value="读书">
          读书
          <input name="ck[]" type="checkbox" id="ck[]" value="写作">
          <label for="label">写作 </label>
          <input name="ck[]" type="checkbox" id="ck[]" value="打乒乓球">
          <label for="label">打乒乓球 </label>
          <input name="ck[]" type="checkbox" id="ck[]" value="旅游">
          <label for="label">旅游&nbsp; *至少选择一项</label></td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td align="left"><input type="submit" name="submit" id="submit" value="  立即提交  "></td>
      </tr>
      <tr>
        <td align="right">&nbsp;</td>
        <td align="left">&nbsp;</td>
      </tr>
    </tbody>
  </table>
</form>
</body>
</html>